home *** CD-ROM | disk | FTP | other *** search
/ PC-Blue - MS DOS Public Domain Library / PC-Blue MS-DOS Public Domain Library - NYACC.iso / vol392 / atromutl.arc / PERFORM.C < prev    next >
Encoding:
Text File  |  1986-10-26  |  1.4 KB  |  48 lines

  1. /* 
  2. PC AT Performance Analyzer by Robert Morein 10/26/86. */
  3. (215)-646-4894
  4.  
  5.  
  6. Purpose: By copying the AT proms into two files, the speed of
  7. file copying to disk is measured. The files, incidentally,  
  8. can be used for other purposes.
  9.  
  10. The AT bios will be in the file "perform2", while the file
  11. "perform1" will normally contain FF's unless there are 
  12. additional rom drivers in the system.
  13.  
  14. Compiled with the Computer Innovations C86 compiler.
  15. */
  16.  
  17.  
  18. #include "STDIO.H"
  19. #include "time.h"
  20. main() {
  21. FILE *rom1, *rom2; char *abstoptr();
  22. unsigned cha≥ *base;
  23. unsigned long i;
  24. long starttm, fintm;
  25.  
  26. /* The file "perform1.exe is whatever is in the range 0xE000 to 0xFFFF,
  27. which sometimes contains additional drivers. */
  28. base = abstoptr( 0xE0000 );
  29. time( &starttm );
  30. rom1 = fopen( "perform1", "wb" );
  31. for( i = 0; i <= 0xFFFF; i++ ) putc( *(base + i), rom1 );
  32. fclose( rom1 );
  33. /* Now we dump the rom bios: */
  34. base = abstoptr( 0xF0000 );
  35. rom2 = fopen( "perform2", "wb" );
  36. for( i = 0; i <= 0xFFFF; i++ ) putc( *(base + i), rom2 );
  37. fclose( rom2 );
  38. time( &fintm );
  39. printf("\nFILE I/O performance time: %ld", fintm - starttm );
  40. printf("\nRelative performance: %f", (double)(fintm - starttm)/12 );
  41. }
  42.  
  43. /* 
  44. When you burn the rom bios, first adjust the checksum, using
  45. setcheck.exe, then split the file into even and odd bytes using
  46. "splitter.exe"
  47. */
  48.